package com.training.java.core.collections.car.post15;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;

import com.training.java.core.collections.car.pre15.Laptop;

public class LaptopHashSetDemo {

	public static void main(String[] args) {
		Laptop laptop1 = new Laptop("Hp", "pavillion", "intel core");
		Laptop laptop2 = new Laptop("Dell", "inspiron", "Quad core");
		Laptop laptop3 = new Laptop("Acer", "aspire", "Dual core");

		laptop1.setOperatingSystem("windows");
		laptop2.setOperatingSystem("Linux");
		laptop3.setOperatingSystem("Mac");

		Set<Laptop> setOfLaptops = new HashSet<Laptop>();
		setOfLaptops.add(laptop1);
		setOfLaptops.add(laptop2);
		setOfLaptops.add(laptop3);

		for (Laptop laptop : setOfLaptops) {
			System.out.println("Company: " + laptop.getCompany());
			System.out.println("Model: " + laptop.getModel());
			System.out.println("Processor: " + laptop.getProecessor());
			System.out.println("Operating System: "
					+ laptop.getOperatingSystem());
			System.out.println("*************************");

		}

	}

}
